/** When your routing table is too long, you can split it into small modules**/

import Layout from '@/layout'

const orgRouter = {
  path: '/org',
  component: Layout,
  redirect: '/org/list',
  name: 'org',
  meta: {
    title: '机构管理',
    icon: 'students',
    roles: ['admin']
  },
  children: [
    {
      path: 'list',
      component: () => import('@/views/org/list'),
      name: 'orgList',
      meta: { title: '机构列表', icon: 'list' }
    },
    {
      path: 'create',
      component: () => import('@/views/org/create'),
      name: 'orgCreate',
      meta: { title: '添加机构', icon: 'create' }
    },
    {
      path: 'edit/:id(\\d+)',
      component: () => import('@/views/org/edit'),
      name: 'orgEdit',
      meta: { title: '机构编辑', noCache: true, activeMenu: '/org/list' },
      hidden: true
    }
  ]
}

export default orgRouter
